package com.mlog.njyjy.ndop.msg.admin.service;

import com.mlog.njyjy.ndop.msg.common.domain.DelayMonitor;
import com.mlog.njyjy.ndop.msg.common.domain.Flow;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author zyz
 * @version v1.0, 2020/8/12
 */
public interface AlarmManagerService {

    /**
     * list all
     *
     * @return
     */
    List<DelayMonitor> list();

    /**
     * list by type
     *
     * @param typeName
     * @return
     */
    List<DelayMonitor> listByType(String typeName);

    /**
     * list by type and times
     *
     * @param typeName
     * @param times
     * @return
     */
    List<DelayMonitor> listByTypeAndTimes(String typeName, String times);

    /**
     * list by flow
     *
     * @param flowList
     * @return
     */
    List<DelayMonitor> listByFlow(List<Flow> flowList);

    /**
     * save delayMonitor
     *
     * @param delayMonitor
     * @return
     */
    boolean save(DelayMonitor delayMonitor);

    /**
     * 导入
     *
     * @param sourceBytes
     * @return
     */
    List<DelayMonitor> importFile(byte[] sourceBytes);

    /**
     * 同步
     *
     * @return
     */
    List<DelayMonitor> syncDelayMonitor();

    /**
     * Synchronize configuration (json string) fetched from the outside
     *
     * @param string
     * @return
     */
    List<DelayMonitor> sync(String string);

    /**
     * 下载模板
     *
     * @param list
     * @return
     */
    boolean downloadTpl(List<DelayMonitor> list);

    /**
     * 启用/取消启用
     * status 0：取消启用 1：启用
     *
     * @param status
     * @param ids
     * @return
     */
    boolean changeStatus(int status, String ids);
}
